<template>
  <div>
    <div class="c-header" :style="styleObj">
      <span></span>
      <b>{{ title }}</b>
      <div class="fanhui" v-show="sshow">
        <el-button @click="onfanhui">返回</el-button>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: String,
    sshow: Boolean,
    color: {
      type: String,
      default: '#999999'
    },
  },
  methods: {
    onfanhui() {
      this.$router.go(-1);
    },
  },
  computed: {
    styleObj() {
      return {
        color: this.color,
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.c-header {
  width: 100%;
  height: 60px;
  font-size: 16px;
  color: #999999;
  line-height: 60px;
  b {
    // margin-left: 30px;
    padding-left: 15px;
    border-left: 4px solid rgba(0, 121, 254, 1);
  }
  .fanhui {
    float: right;
    margin-right: 10px;
  }
}
</style>
